import Cookies from 'js-cookie'

const TokenKey = 'majiang_token'
const FreshTokenKey = 'majiang_fresh_token'

export function getToken() {
  return Cookies.get(TokenKey)
}

export function setToken(token) {
  return Cookies.set(TokenKey, token)
}

export function removeToken() {
  return Cookies.remove(TokenKey)
}

// 刷新
export function getFreshToken() {
  return Cookies.get(FreshTokenKey)
}

export function setFreshToken(token) {
  return Cookies.set(FreshTokenKey, token)
}

export function removeFreshToken() {
  return Cookies.remove(FreshTokenKey)
}

